* MASTERFILE


/* 

Replication Materials for:

“Mobility responses to the establishment of a residential tax haven: 
Evidence from Switzerland”

Martínez (2022)
Journal of Urban Economics, Volume 129, May 2022, 103441


*/



* --> SET A PATH according to your machine. 
/* All the folders and files provided with this replication
repository neet to be stored in this location, without altering the folder
structure.
*/

global mypathRR "/Users/isabel/Dropbox/TaxMobility_OW/ReplicationFiles/"

* --> INSTALL REQUIRED PACKAGES
/*
ssc install boottest
ssc install coefplot
ssc install diff
ssc install estout
ssc install reghdfe
ssc install spmap
ssc install tsspell
ssc install winsor2
ssc install xtvent
*/


* RUN ALL THE CODE
cd "$mypathRR"

* 1) PREPARE THE DATASATES
* run 0.1-setup_TaxPayers_all_cantons-ESTV.do 			// data cannot be shared
* run 0.2-setup_movers_dta.do 							// data cannot be shared
* run 0.4-setup_TaxDataOW-my_dta_v8.1.do				// data cannot be shared
cd "$mypathRR"
* run 0.3-setup_origin_60_80_before-after.do			// data cannot be shared
cd "$mypathRR"
run 0.5.1-setup_RevenueData-ktn.do
cd "$mypathRR"
run 0.5.2-setup_RevenueData-ktn+gde.do

* 2) PLOT DESCRIPTIVES
cd "$mypathRR"
run 1.1-plot_taxrates-taxable_inc.do
cd "$mypathRR"
run 1.2-taxrate_comparisons.do
cd "$mypathRR"
*	run 1.3-map_origin.do								// data cannot be shared

* 3) CROSS-CANTON COMPARISONS
cd "$mypathRR"
*	run 2.1-DiD_cantons-difference_plot+trend.do		// data cannot be shared
cd "$mypathRR"
*	run 2.2-ES_cantons-top_earners.do					// data cannot be shared
cd "$mypathRR"
*	run 2.3-DiD-Tab1+2_PanA-municipality.do				// data cannot be shared
cd "$mypathRR"
*	run 2.4-DiD-Tab1+2_PanB-canton.do					// data cannot be shared
cd "$mypathRR"
*	run 2.5-DiD-Tab1+2_PanC-treatgroup.do				// data cannot be shared

* TAX MOBILITY ELASTICITIES
cd "$mypathRR"
*	run 3.1-Masterfile-Residents.do						// data cannot be shared
cd "$mypathRR"
	run 3.2-Masterfile-Inmovers.do						// data cannot be shared
cd "$mypathRR"
	run 3.3-SummaryTable_LaTeX.do						// data cannot be shared
cd "$mypathRR"
	run 3.4-mechanical_revenue_calculation.do			// data cannot be shared

* 5) REVENUE ANALYSIS
cd "$mypathRR"
run 4.1-plot_cant_revenue_1990_2016.do
cd "$mypathRR"
run 4.2-ES_revenue.do

* 6) EMPLOMYENT ANALYSIS
cd "$mypathRR"
run 5.1-ES_employment.do
cd "$mypathRR"
run 5.2-table_sectoral_job_growth.do


 * * * * E N D * * * * *  E N D  * * * * *  E N D * * * * *  E N D * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

